<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../static/css/index.css" th:href="@{/css/index.css}">
    <!-- 引入 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <title>博客首页</title>
</head>
<body style="font-family: 'Microsoft YaHei';">
    <!-- 导航 -->
<div class="animated bounceInDown">
<nav class="ui inverted segment m-padded-td" th:replace="_fragments :: menu(1)">
    <div class="ui container">
      <div class="ui inverted secondary menu">
            <h2 class="ui teal header item" style="font-size: 25px !important;">个人博客</h2>
          <a href="blog.html" th:href="@{/index}" class="active m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
          <a href="#" th:href="@{/types}" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
          <a href="#" th:href="@{/tages}" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
          <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide"><i class="clone icon"></i>归档</a>
            <div class="right item">
                <form name="search" action="#">
                <div class="ui icon inverted transparent input">
                    <input type="text" id="search" placeholder="Search small...">
                    <i class="search link icon"></i>
                  </div>
                </form>
            </div>
        </div>
    </div>
    </nav>
</div>
<!-- 中间 -->
    <div  class="m-padded-tb-big m-min-height">
        <div class="ui container m-mobile-wide m-pc-wide m-pc-height">
            <div class="ui stackable grid">
                <!--左边个人简介-->
                <div class="four wide column animated slideInLeft">
                    <!--个人简介-->
                    <div class="ui card fluid ">
                            <div class="image site-author">
                                <img  src="https://picsum.photos/id/1/800/600">
                            </div>
                            <div class="content">
                                <a class="header">kevintam</a>
                                <div class="meta">
                                    <span class="date">Just a coder</span>
                                </div>
                                <div class="description">
                                    <p>一个Java初学者</p>
                                    <p>折腾在 0 和 1 世界里的青年</p>
                                    <p>一个编程爱好者</p>
                                    <p>正在学习和探索编写高效代码的方法</p>
                                    <p>希望可以结识共同成长的小伙伴</p>
                                </div>
                            </div>
                            <div class="extra content links-of-author">
                                <a class="ui circular github icon button" data-content="https://github.com/txh-rookie" data-position="bottom left"><i class="github icon"></i></a>
                                <a class="ui wechat circular icon button"><i class="weixin icon"></i></a>
                                <a class="ui qq circular icon button" data-content="843808107" data-position="bottom center"><i class="qq icon"></i></a>
                            </div>

                            <div class="ui wechat-qr flowing popup transition hidden">
                                <img src="../static/images/weixin.png" th:src="@{/images/weixin.png}" alt="" class="ui rounded image m-mobile-hide" style="width: 110px">
                                <span class="m-mobile-show">公众号：kevintam</span>
                            </div>
                        </div>

                    <!--好友列表-->
                    <div class="ui segments m-margin-top-large">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column">
                                    <i class="users icon"></i>好友
                                </div>
                            </div>
                        </div>
                        <div class="ui blue segment">
                            <div class="ui cards">
                                <div class="card">
                                    <div class="content">
                                        <div class="header">谭小虎</div>
                                        <div class="meta">Friend</div>
                                        <div class="description">
                                            开源项目《<a href="https://github.com/txh-rookie" target="_blank">rookie</a>》的作者
                                        </div>
                                    </div>
                                    <div class="extra content links-of-author">
                                        <a class="ui mini circular github icon button" data-content="https://github.com/txh-rookie" data-position="bottom left"><i class="github icon"></i></a>
                                        <a class="ui mini zheng circular icon button"><i class="weixin icon"></i></a>
                                    </div>

                                    <div class="ui zheng-qr flowing popup transition hidden">
                                        <img src="../static/images/zheng.png" th:src="@{/images/weixin.png}" alt="" class="ui rounded image m-mobile-hide" style="width: 110px">
                                        <span class="m-mobile-show">公众号：谭小虎</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--中间博客列表-->
                <div class="eight wide column animated slideInUp" >
                    <!--header-->
                    <div class="ui top attached segment" th:each="blog:${pageInfo.list}">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <h3 class="ui blue header">博客</h3>
                            </div>
                            <div class="right aligned column">
                                共 <h2 class="ui teal header m-inline-block m-text-thin" th:text="${pageInfo.total}">1</h2> 篇
                            </div>
                        </div>

                    <!--content-->
                    <div class="ui attached  segment" >
                        <div class="ui padded vertical segment m-padded-tb-large">
                            <div class="ui middle aligned mobile reversed stackable grid" >
                                <div class="eleven wide column">
                                    <h3 class="ui header" ><a  href="#" th:href="@{/blog/{id}(id=${blog.id})}" class="m-black post-title-link" th:text="${blog.title}">Hello world！</a></h3>
                                    <p class="m-text" th:text="${blog.description}">2020年1月1日，
这将是一个值得纪念的日子，  
我的个人博客，终于出世了~  
Hello,world!......</p>
                                    <div class="ui grid">
                                        <div class="eleven wide column">
                                            <div class="ui mini horizontal link list">
                                                <div class="item">
                                                    <img src="./images/codemusik_wps图片.png" th:src="@{${blog.avatar}}" alt="" class="ui avatar image">
                                                    <div class="content"><a  class="header" th:text="${blog.nickname}">kevintam</a></div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i><span th:text="${blog.updateTimeStr}">2020-01-01</span>
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i> <span th:text="${blog.views}">112</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="right aligned five wide column">
                                            <a  href="/types/1" th:text="${blog.typeName}"  class="ui blue basic label m-padded-tiny m-text-thin">生活日常</a>
                                        </div>
                                    </div>
                                </div>
                           
                                <div class="five wide column">
                                    <a  href="/blog/1" >
                                        <img src="https://picsum.photos/id/0/800/450" th:src="@{${blog.firstPicture}}" alt="" class="ui rounded image">
                                    </a>
                                </div>

                            </div>
                        </div>
                    </div>
                    <!--footer-->
                                <div class="ui mini pagination menu" style="margin-left: 20em !important;" th:if="${blogStat.index}==1 or ${pageInfo.isLastPage}==true">
                                    <a class=" item"  th:href="@{/(page=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a>
                                    <a class=" item" th:href="@{/(page=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
                                </div>
                </div>
                </div>
                <!--右边的top-->
                <div class="four wide column animated slideInRight">

                    <!--分类-->
                    <div class="ui segments">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column">
                                    <i class="idea icon"></i>分类
                                </div>
                                <div class="right aligned column">
                                    <a  href="types/-1" >more <i class="angle double right icon"></i></a>
                                </div>
                            </div>
                        </div>
                        <div class="ui blue segment">
                            <div class="ui fluid vertical menu" th:each="type,types:${type}">
                                <a  href="/types/1" th:href="@{/types/{id}(id=${type.id})}" class="item">
                                    <span th:text="${type.name}">生活日常</span>
                                    <div class="ui blue basic left pointing label" th:text="${#arrays.length(type.blogs)}">1</div>
                                </a>
                            </div>
                        </div>
                    </div>

                    <!--标签-->
                    <div class="ui segments m-margin-top-large">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column">
                                    <i class="tags icon"></i>标签
                                </div>
                                <div class="right aligned column">
                                    <a  href="tags/-1" >more <i class="angle double right icon"></i></a>
                                </div>
                            </div>
                        </div>
                        <div class="ui blue segment" >
                            <a  href="/tags/1" th:href="@{/tags/{id}(id=${tag.id})}" th:each="tag,tags:${tags}"  class="ui blue basic left pointing label m-margin-tb-tiny">
                                <span th:text="${tag.name}">日记</span>
                                <div class="ui blue basic left pointing label" th:text="${#arrays.length(tag.blogs)}">1</div>
                            </a>
                        </div>
                    </div>

                    <!--最新推荐-->
                    <div class="ui segments m-margin-top-large">
                        <div class="ui secondary segment ">
                            <i class="bookmark icon"></i>最新推荐
                        </div>
                        <div class="ui segment" th:each="recommendBlogs,recommendBlog:${recommendBlog}">
                            <a href="/blog/1" th:href="@{/blog/{id}(id=${recommendBlogs.id})}" th:text="${recommendBlogs.title}"  class="m-black m-text-thin">Hello world！</a>
                        </div>
                    </div>

                    <!--二维码-->
                    <!--<h4 class="ui horizontal divider header m-margin-top-large">扫码关注我</h4>-->
                    <!--<div class="ui centered card" style="width: 11em">-->
                        <!--<img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" alt="" class="ui rounded image" >-->
                    <!--</div>-->
                </div>

            </div>
        </div>
    </div>
<!-- 底部 -->

    <footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="four wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/weixin.png" th:src="@{/images/weixin.png}" class="ui rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="four wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                <div class="ui inverted link list">
                    <a  class="item m-text-thin">843808107@qq.com</a>
                    <a  class="item m-text-thin">QQ：843808107</a>
                </div>
            </div>
            <div class="eight wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">Blog</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini" style="font-size: 15px; color:darkgray;">这是我的个人博客，会分享关于编程、写作、思考相关的内容，希望可以给来到这儿的人有所帮助~</p>
            </div>
        </div>
        <div class="ui inverted link horizontal list">
            <a class="item m-text-thin" style="vertical-align: middle" href="http://icp.chinaz.com/info?q=kevintam.cn" target="_blank">
                <span>备案/许可证号：鄂ICP备19030178号</span>
            </a>
            <a class="item m-text-thin" style="vertical-align: middle" href="http://www.beian.miit.gov.cn/" target="_blank">
                <span>鄂ICP备19030178号-1</span>
            </a>
        </div>
</footer>
</canvas>
<!--     waifu-tips.js 依赖 JQuery 库-->
        <script src="../static/assets/jquery-1.11.0.min.js" th:src="@{/assets/jquery-1.11.0.min.js}"></script>
        <!-- 实现拖动效果，需引入 JQuery UI -->
        <script src="../static/assets/jqueryUi.js" th:src="@{/assets/jqueryUi.js}"></script>
        <script src="../static/assets/autoload.js" th:src="@{/assets/autoload.js}"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<script src="../static/js/ribbon.min.js" th:src="@{/js/ribbon.min.js}"></script>

<script>
    window.onload = function () {
        var pageNumber = 0;
        console.log(pageNumber);
        var aList = $('#pageBtns').children();
        console.log(aList);
        for (var i = 0; i < aList.length; i++) {
            var a = aList[i];
            if(a.text == (pageNumber + 1)){
                $(a).toggleClass('basic');
            }
        }
    };

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });
    $('.wechat').popup({
        popup : $('.wechat-qr'),
        position: 'bottom center'
    });
    $('.zheng').popup({
        popup : $('.zheng-qr'),
        position: 'bottom center'
    });
    $('.qq').popup();
    $('.github').popup();
</script>

</body>

</html>